window.addEventListener("load", function () {
	// $(".mask").addEventListener("click", function (e) {
	// 	this.style.display = "none";
	// 	document.body.style.overflow = "auto";
	// });
	// //阻止登录框的事件传播
	// $(".register").addEventListener("click", function (e) {
	// 	e.stopPropagation();
	// });
	$(".register form")[0].style.display = "block";
	$(".registertato a").forEach(function (v, i) {
		v.addEventListener("click", function () {
			//3.排他思想
			$(".registertato a").forEach(function (item, index) {
				item.classList.remove("active");
				$(".register form")[index].style.display = "none";
			});
			$(".register form")[i].style.display = "block";
			//4.再给当前按钮添加样式激活样式
			v.classList.add("active");
		});
	});
});
